<script setup>
import TreeMenu from './treeMenu.vue'
import { useRouter } from 'vue-router'
import { reactive,computed } from 'vue'
import { useStore } from 'vuex'

const router = useRouter()
const store = useStore()
const menuData = computed(() => store.state.menu.routerList)

const isCollapse= computed(() => store.state.menu.isCollapse)

const handleOpen = () => {

}

const handleClose = () => {
    
}
</script>

<template>
    <el-menu
        :style="{width:!isCollapse?'230px':'64px'}"
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        text-color="#fff"
        @open="handleOpen"
        @close="handleClose"
        :collapse="isCollapse"
    >
        <p class="logo-lg">{{!isCollapse?'快捷陪诊':'快捷'}}</p>
        <TreeMenu :index="1" :menuData="menuData"></TreeMenu>    
    </el-menu>
</template>

<style lang="less" scoped>
    .el-menu-vertical-demo {
        height: 100%;
        .logo-lg{
            font-size: 20px;
            text-align: center;
            height: 50px;
            line-height: 50px;
            color: #fff;
        }
    }
</style>